package avicit.bdp.dcs.semistructure.dto;

import avicit.bdp.common.base.BaseDTO;
import avicit.platform6.core.annotation.log.FieldRemark;
import avicit.platform6.core.annotation.log.Id;
import avicit.platform6.core.annotation.log.LogField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.StringUtils;

import javax.persistence.Column;
import javax.persistence.Table;

/**
 * 任务文件关联实体类(bdp_dcs_job_file)
 */
@ApiModel(value = "JobFileDTO", description = "bdp_dcs_job_file")
@Table(name = "bdp_dcs_job_file")
public class JobFileDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    // 主键
    @Id
    @LogField
    @ApiModelProperty(value = "主键")
    @FieldRemark(column = "id", field = "id", name = "id")
    @javax.persistence.Id
    @Column(name = "id")
    private String id;

    // jobId
    @LogField
    @ApiModelProperty(value = "jobId")
    @FieldRemark(column = "job_id", field = "jobId", name = "jobId")
    @Column(name = "job_id")
    private String jobId;

    // 任务id
    @LogField
    @ApiModelProperty(value = "任务id")
    @FieldRemark(column = "task_id", field = "taskId", name = "任务ID")
    @Column(name = "task_id")
    private String taskId;

    // 流程实例id
    @LogField
    @ApiModelProperty(value = "流程实例id")
    @FieldRemark(column = "process_instance_id", field = "processInstanceId", name = "流程实例ID")
    @Column(name = "process_instance_id")
    private String processInstanceId;

    // 文件路径
    @LogField
    @ApiModelProperty(value = "文件路径")
    @FieldRemark(column = "file_path", field = "filePath", name = "文件路径")
    @Column(name = "file_path")
    private String filePath;

    // 组织机构代码
    @ApiModelProperty(value = "组织机构代码")
    @FieldRemark(column = "org_identity", field = "orgIdentity", name = "组织机构代码")
    @Column(name = "org_identity")
    private String orgIdentity;

    // 密级
    @ApiModelProperty(value = "密级")
    @FieldRemark(column = "secret_level", field = "secretLevel", name = "密级")
    @Column(name = "secret_level")
    private String secretLevel;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getJobId() {
        return jobId;
    }

    public void setJobId(String jobId) {
        this.jobId = jobId;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    @Override
    public String getOrgIdentity() {
        return orgIdentity;
    }

    @Override
    public void setOrgIdentity(String orgIdentity) {
        this.orgIdentity = orgIdentity;
    }

    @Override
    public String getSecretLevel() {
        return secretLevel;
    }

    @Override
    public void setSecretLevel(String secretLevel) {
        this.secretLevel = secretLevel;
    }

    public String getProcessInstanceId() {
        return processInstanceId;
    }

    public void setProcessInstanceId(String processInstanceId) {
        this.processInstanceId = processInstanceId;
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    @Override
    public String getLogFormName() {
        if (StringUtils.isEmpty(super.logFormName)) {
            return "任务文件关联模块";
        } else {
            return super.logFormName;
        }
    }

    @Override
    public String getLogTitle() {
        if (StringUtils.isEmpty(super.logTitle)) {
            return "任务文件关联";
        } else {
            return super.logTitle;
        }
    }

}